package com.css.fxfzfxqh.modules.taskMaps.controller;

import com.css.fxfzfxqh.base.response.RestResponse;
import com.css.fxfzfxqh.modules.taskMaps.entity.TaskMaps;
import com.css.fxfzfxqh.modules.taskMaps.service.TaskMapsService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: fxfzfxqh
 * @Author: lhl
 * @CreateDate: 2023/11/24 10:44
 */
@RestController
@RequestMapping("/taskMaps/")
public class TaskMapsController {
    @Resource
    TaskMapsService taskMapsService;

    @GetMapping("getByParam")
    public RestResponse getByParam(TaskMaps entity){
        List<TaskMaps> byParam = taskMapsService.getByParam(entity);
        return RestResponse.succeed(byParam);
    }

    @PostMapping("save")
    public RestResponse save(@RequestBody TaskMaps entity){
        taskMapsService.save(entity);
        return RestResponse.succeed("保存成功！");
    }
}
